home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_bas
/
mices
/
charcode.bas
next >
Wrap
BASIC Source File
|
1988-04-16
|
2KB
|
67 lines
DEFINT A-Z: KEY OFF: COLOR 7,0: CLS
DEF FNY(I$)=(I$ = "") OR (LEFT$(I$,1)="y") OR (LEFT$(I$,1)="Y")
CODEV=0
CLS: LOCATE 5,10: PRINT "To determine character code, reply to"
LOCATE 6,10: PRINT "the following questions - Enter = Yes"
LOCATE 8,10: INPUT "Allow blanks ";I$
IF FNY(I$) THEN CODEV=CODEV+1
LOCATE 10,10: INPUT "Allow numbers (including decimal) ";I$
IF FNY(I$) THEN CODEV=CODEV+2
LOCATE 12,10: INPUT "Allow alphabetic characters ";I$
IF FNY(I$) THEN CODEV=CODEV+4
IF ((CODEV AND 4) <> 0) THEN
LOCATE 14,10: INPUT "Shift all alphas to upper case ";I$
IF FNY(I$) THEN CODEV=CODEV+8
END IF
LOCATE 14-2*((CODEV AND 4) <> 0),10: INPUT "Allow Symbols ";I$
IF FNY(I$) THEN CODEV=CODEV+16
CLS
LOCATE 5,10: PRINT "CHAR.CODE =";CODEV
LOCATE 8,10
IF ((CODEV AND 1) <> 0) THEN
PRINT "Blanks are allowed"
ELSE
PRINT "Blanks are not allowed"
END IF
LOCATE 10,10
IF ((CODEV AND 2) <> 0) THEN
PRINT "Numbers are allowed"
ELSE
PRINT "Numbers are not allowed"
END IF
LOCATE 12,10
IF ((CODEV AND 4) <> 0) THEN
PRINT "Alphabetic characters are allowed"
LOCATE 14,10
IF ((CODEV AND 8) <> 0) THEN
PRINT "Lower case alphas are shifted to upper case"
ELSE
PRINT "Lower case alphas are not shifted to upper case"
END IF
LOCATE 16,10
ELSE
PRINT "Alphabetic characters are not allowed"
LOCATE 14,10
END IF
IF ((CODEV AND 16) <> 0) THEN
PRINT "Symbols are allowed"
ELSE
PRINT "Symbols are not allowed"
END IF
CALL DELAY(10)